home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 11944 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.1 KB  |  32 lines

  1. Path: cerfacs.fr!muller
  2. From: muller@cerfacs.fr (Muller Jens Dominik)
  3. Newsgroups: comp.lang.c
  4. Subject: Q: pointer to const
  5. Date: 28 Mar 1996 03:06:40 GMT
  6. Organization: C.E.R.F.A.C.S., Toulouse, France
  7. Distribution: world
  8. Message-ID: <4jcvo0$9v9@zephyr.cerfacs.fr>
  9. NNTP-Posting-Host: io.cerfacs.fr
  10.  
  11. Maybe it is obvious, but why doesn't the SGI ( and Alpha ) 
  12. compiler allow me to copy the pointer to const? I am not
  13. attempting to change the pointed to const. Jens.
  14.  
  15. void chk_cnst ( const double *Pdata )
  16. {
  17.   double *Psome ;
  18.   Psome = Pdata ;
  19. }
  20.  
  21. cc -c t2.c
  22. cfe: Warning 709: t2.c, line 4: Incompatible pointer type assignment
  23.    Psome = Pdata ;
  24.  --------^
  25.  
  26. -----------------------------------------------------------------------
  27. |      " Shouldn't you be at the controls? If you insist"             |
  28. |             Robert Urich and Mary Crosby in 'The Ice Pirates'       |
  29. |                                                                     |
  30. |     Jens-Dominik Mueller, CERFACS, Toulouse, muller@cerfacs.fr      |
  31. -----------------------------------------------------------------------
  32.